home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / nerak2.zip / PRISONER.SCR < prev    next >
Text File  |  1995-09-24  |  4KB  |  145 lines

  1. !
  2. ! Default prisonner script..
  3. !
  4. ! (c) DC Software, 1989-1995
  5. !
  6.  
  7. !------------------------------------------------------------------------!
  8. :@TALK ! Talk to the character !
  9. !------------------------------------------------------------------------!
  10.  
  11.   if player.hp = 0 then
  12.     writeln( player.name, " is dead!" );
  13.     STOP;
  14.   endif;
  15.  
  16.   if npc.picture >= 0 then
  17.     viewpcx(npc);
  18.   endif;
  19.  
  20.   loadtext( npc.text ); ! Get the NPC's text block !
  21.   loadvfl( npc.voice ); ! Get the NPC's voice block !
  22. ! First, say hello.. !
  23.   if NPC.V0 > 0 then
  24.     if NPC.V1 > 0 goto AFTER;
  25.     writeln( "You're back.. I thought you were going to leave me here.." );
  26.   else
  27.     writeln( "Are you here to help me?" );
  28.   endif;
  29.  
  30. ! Now, set some variables..
  31.   NPC.V0 = 1; ! From know on, remember we've been here
  32.  
  33. :CHAT
  34.   L3 = getstr("Name","Job","Join","Bye");
  35.   if L3 = -1 then 
  36.     writeln( "Don't leave me here.. Please.." );
  37.     goto CHAT; ! Pressed ESCape !
  38.   endif;
  39.  
  40. ! Handle JOIN differently..
  41.   if L3 = 2 then 
  42.     if group.size = 6 then
  43.       writeln( "Your party is full!" );
  44.       goto CHAT;
  45.     endif;
  46.     player.v1 = 1; ! 1 when I join the party, 2 if delivered to quester !
  47.     if NOT dotext( S0 ) then
  48.       writeln( "The sooner the better.." );
  49.     endif;
  50.     JOIN;
  51.     goto XSTOP;
  52.   endif;
  53.  
  54. ! First, see if the keyword typed is in the character's text block !
  55.   if dotext( S0 ) goto CHAT;
  56.  
  57. ! It didn't, so try the predefined ones..
  58.   on L3 goto CNAME, CJOB, CHAT, CSTOP;
  59.  
  60. ! Nope, try a 'DEFAULT' line
  61.   if not dotext( "DEFAULT" ) then
  62.     writeln( "I don't know anything about that!" );
  63.   endif;
  64.   goto CHAT;
  65.  
  66. :CNAME
  67.   writeln( "My name is ", NPC.name, "." );
  68.   GOTO CHAT;
  69.  
  70. :CJOB
  71.   writeln( "I am a ", npc.type );
  72.   GOTO CHAT;
  73.  
  74. :CSTOP
  75.   writeln( "Don't leave me here.. Please.." );
  76.   goto XSTOP;
  77.  
  78. !
  79. ! This is the script for AFTER I've been rescued !
  80. !
  81. :AFTER
  82.  
  83.   if npc.v1 = 1 then ! We JOINED, but were not delivered !
  84.     if NOT dotext( "DELIVER" ) then
  85.       writeln( "I need your help to return home.." );
  86.     endif;
  87.     goto CHAT;
  88.   endif;
  89.  
  90. :CHAT2
  91.   L3 = getstr("Name","Job","Join","Bye");
  92.  
  93. ! First, see if the keyword typed is in the character's text block !
  94.   if dotext( S0 ) goto CHAT2;
  95.  
  96. ! It didn't, so try the predefined ones..
  97.   on L3 goto CNAME2, CJOB2, CJOIN2, CSTOP2;
  98.  
  99. ! Nope, try a 'DEFAULT' line
  100.   if not dotext( "DEFAULT" ) then
  101.     writeln( "I don't know anything about that!" );
  102.   endif;
  103.   goto CHAT2;
  104.  
  105. :CNAME2
  106.   writeln( "My name is ", NPC.name, "." );
  107.   GOTO CHAT2;
  108.  
  109. :CJOB2
  110.   writeln( "I am a ", npc.type );
  111.   GOTO CHAT2;
  112.  
  113. :CJOIN2
  114.   writeln( "Sorry.  I've had my fill of adventure.." );
  115.   GOTO CHAT2;
  116.  
  117. :CSTOP2
  118.   writeln( "Nice talking to you.." );
  119.   goto XSTOP;
  120. !------------------------------------------------------------------------!
  121. !
  122. :@DROP  ! DROP a player from the group. !
  123. !
  124. !------------------------------------------------------------------------!
  125.   !
  126.   ! Here, you can handle the 'vacate' action for the prisoner.  Omit
  127.   ! the CONTINUE command tells the system that even though we took some
  128.   ! action, standard processing should be taken anyway.  Change it to 
  129.   ! a 'STOP' if you do not want standard processing to take place.
  130.   !
  131.   ! Note that execution starts with the '@DROP' tag, so no graphics
  132.   ! has been displayed.  A graphics is displayed when you '@TALK' only.
  133.   CONTINUE;
  134.  
  135. !-----------------------------------------------------------------!
  136. ! All STOPs now lead here so the screen can be restored if needed !
  137. !-----------------------------------------------------------------!
  138. :XSTOP
  139.   if npc.picture >= 0 then
  140.     paint(window); ! Assumes the picture fits in the window !
  141.   endif;
  142.   stats(-1);
  143.   STOP;
  144.  
  145.